package com.igeekhome.controller.api;

import com.igeekhome.pojo.DCustomer;
import com.igeekhome.util.ResultBean;
import com.igeekhome.util.TableResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wxb
 * @date 2020/1/10
 */
@RestController
@RequestMapping("/api/maintenance")
public class MaintenanceControllerApi {
    @Autowired
    private BaseDictControllerApi baseDictControllerApi;

    @Value("002")
    private String MATERIEL;
    @Value("物料品名维护")
    private String MATERIEL_NAME;
    @RequestMapping("/list")
    public TableResultBean list(@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer limit){
        baseDictControllerApi.setCode(MATERIEL);

        return baseDictControllerApi.list(page,limit);
    }
    /*@RequestMapping("/add")
    public ResultBean add(DCustomer dCustomer) {
        customerService.add(dCustomer);
        return  ResultBean.ok();
    }*/
}
